Skip to main content

Establishing a Colony

This endpoint allows players to establish a new colony on the game map, claiming a specific location for resource gathering, trade, and defense.


Endpoint

POST /colonies

Description

Creates a new colony at the specified location. Once a colony is established, it gains access to resource collection and trading options within the specified region.


Request Parameters

Headers

NameTypeRequiredDescription
AuthorizationstringYesBearer token for authentication

Body Parameters

NameTypeRequiredDescription
locationobjectYesCoordinates of the desired colony location.
namestringYesName for the new colony.
leaderIdstringYesID of the player or character leading the colony.
resourcesobjectOptionalInitial resource allocations (e.g., food, water).

Location Object

FieldTypeDescription
xintX-coordinate of the colony’s location
yintY-coordinate of the colony’s location

Example Request

POST /colonies
Authorization: Bearer your-token

{
"location": {
"x": 42,
"y": -18
},
"name": "New Dawn",
"leaderId": "player123",
"resources": {
"food": 500,
"water": 300
}
}